<?php
namespace BP\Sys;

use BP\En\EntitiesOID;

require_once("java/util/List.php");
require_once("BP/GPM/Emp.php");
class SysFileManagers extends EntitiesOID {
	public static function constructor__ () 
	{
		$me = new self();
		return $me;
	}
	public function ToJavaList () 
	{
		return $this;
	}
	public static function constructor__String_String ($EnName, $refval) // [String EnName, String refval]
	{
		$me = new self();
		$qo = new QueryObject($me);
		$qo->AddWhere(SysFileManagerAttr::$EnName, $EnName);
		$qo->addAnd();
		$qo->AddWhere(SysFileManagerAttr::$RefVal, $refval);
		$qo->DoQuery();
		return $me;
	}
	public static function constructor__String ($EnName) // [String EnName]
	{
		$me = new self();
		$qo = new QueryObject($me);
		$qo->AddWhere(SysFileManagerAttr::$EnName, $EnName);
		$qo->DoQuery();
		return $me;
	}
	public function getNewEntity () 
	{
		return SysFileManager::constructor__();
	}
	public function GetSysFileByAttrFileNo ($key) // [String key]
	{
		foreach ($this->ToJavaList() as $en) 		{
			if ($en->getAttrFileNo()->equals($key))
			{
				return $en;
			}
		}
		return NULL;
	}
}
?>
